package com.ruoyi.orders.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 订单对象 orders
 *
 * @author ruoyi
 * @date 2025-06-03
 */
public class Orders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单唯一ID */
    private String orderId;

    /** 用户标识 */
    @Excel(name = "用户标识")
    private String userId;

    /** 柜体ID */
    @Excel(name = "柜体ID")
    private String cabinetId;

    /** 格口ID */
    @Excel(name = "格口ID")
    private Long gridId;

    /** 加密取餐码 */
    @Excel(name = "加密取餐码")
    private String qrCode;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private String status;

    /** 存餐时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "存餐时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date storedTime;

    /** 取餐时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "取餐时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date completedTime;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setOrderId(String orderId)
    {
        this.orderId = orderId;
    }

    public String getOrderId()
    {
        return orderId;
    }

    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getUserId()
    {
        return userId;
    }

    public void setCabinetId(String cabinetId)
    {
        this.cabinetId = cabinetId;
    }

    public String getCabinetId()
    {
        return cabinetId;
    }

    public void setGridId(Long gridId)
    {
        this.gridId = gridId;
    }

    public Long getGridId()
    {
        return gridId;
    }

    public void setQrCode(String qrCode)
    {
        this.qrCode = qrCode;
    }

    public String getQrCode()
    {
        return qrCode;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStoredTime(Date storedTime)
    {
        this.storedTime = storedTime;
    }

    public Date getStoredTime()
    {
        return storedTime;
    }

    public void setCompletedTime(Date completedTime)
    {
        this.completedTime = completedTime;
    }

    public Date getCompletedTime()
    {
        return completedTime;
    }

    public void setExpireTime(Date expireTime)
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime()
    {
        return expireTime;
    }

    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("userId", getUserId())
            .append("cabinetId", getCabinetId())
            .append("gridId", getGridId())
            .append("qrCode", getQrCode())
            .append("status", getStatus())
            .append("storedTime", getStoredTime())
            .append("completedTime", getCompletedTime())
            .append("expireTime", getExpireTime())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
